//
//  PreviewView.h
//  NewsMaker Touch
//
//  Created by Reisen on 9/30/14.
//  Copyright (c) 2014 Reisen. All rights reserved.
//

#import <UIKit/UIKit.h>
@class PreviewView;
@protocol PreviewViewDelegate <NSObject>

@optional
- (void)playbackCompleted:(PreviewView*)preview;
@end


@class Segment;
@interface PreviewView : UIView
{
    Segment* currentSegment;
    BOOL isClosing;
    
    BOOL backward;
}
@property (assign) id<PreviewViewDelegate> delegate;

@property (strong) IBOutlet UIView* videoView;
@property (strong) IBOutlet UIView* layoutView;

@property (nonatomic, strong) IBOutlet UIButton* playPauseButton;


@property (nonatomic, strong) NSMutableArray* segments;


-(void)loadSegment:(Segment*)seg;
-(void)playNextSegment;
-(IBAction)close:(id)sender;
-(void) play;
-(void) stop;
-(void) pause;
@end
